* xterm.c: Integer and memory overflow issues.
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 29 Jul 2011 05:12:49 +0000 (22:12 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 29 Jul 2011 05:12:49 +0000 (22:12 -0700)
commit5f1a3e601ccc288dd28cea11b05b2199397c4726
treebd336325d3d24962d18ece1b18ebbf4a4f6eb30a
parentb715d4fa8225ab5368aa3287c575af1f53dae004
* xterm.c: Integer and memory overflow issues.

(x_color_cells, handle_one_xevent, x_term_init):
Check for size calculation overflow.
(x_color_cells): Don't store size until memory allocation succeeds.
(handle_one_xevent): Use ptrdiff_t, not int, for byte counts.
(x_term_init): Don't assume length fits in int (sprintf is limited
to int size).
src/ChangeLog
src/xterm.c